		
		<script type="text/javascript" src="<?=url_tmpl()?>gridview/highlighter/codehighlighter.js"></script>	
        <script type="text/javascript" src="<?=url_tmpl()?>gridview/highlighter/javascript.js"></script>			
        <script type="text/javascript" src="<?=url_tmpl()?>gridview/javascript/jquery.fixheadertable.js"></script>	
		<script type="text/javascript">  
			var url = '<?=base_url()?>';
			var control = '<?=$cotrol;?>';
			var action = 'insert';
			var title = 'trung tâm';
			var width = 380;
			var height = 350;	
			var arr_clm = [50,50,120,150,100,120,250,50,50,'\x61\x75\x74\x6F'];$(function() {searchs(); deleteAll();getList();$("#id").val('');$("#adds").click(function(){save('');});$("#edit").click(function(){var id = $("#id").val();save(id);});});function save(id){var names = $("#names").val();var codes = $("#codes").val();if(codes==''){errmsg('\x4D\xE3 \x74\x72\x75\x6E\x67 \x74\xE2\x6D \x6B\x68\xF4\x6E\x67 đượ\x63 \x74\x72ố\x6E\x67.');$("#codes").focus();return false;}if(names==''){errmsg('\x54\xEA\x6E \x74\x72\x75\x6E\x67 \x74\xE2\x6D \x6B\x68\xF4\x6E\x67 đượ\x63 \x74\x72ố\x6E\x67.');$("#names").focus();return false;}$.ajax({async: false,url: url+control+'/\x73\x61\x76\x65',type: '\x50\x4F\x53\x54',data: {id:id,str:queryInsert()},success: function(data) {if(data == 1){okmsg('\x54\x68\xEA\x6D \x6Dớ\x69 \x74\x68\xE0\x6E\x68 \x63\xF4\x6E\x67.');getList(querySearch());return false;}else{okmsg('\x54\x68\xEA\x6D \x6Dớ\x69 \x74\x68ấ\x74 \x62ạ\x69.');return false;}}});return false;}function func_get(){deletes();checkall();$("#refresh").click(function(){$(".insert").val('');$("#id").val('');return false;});$('.\x73\x65\x64\x69\x74\x73').each(function(e){$(this).click(function(){var id = $(this).attr('\x69\x64');var scodes = $(".scodes").eq(e).html();var snames = $(".snames").eq(e).html();var susercode = $(".susercode").eq(e).html();var sphone = $(".sphone").eq(e).html();var semail = $(".semail").eq(e).html();$("#id").val(id);$("#codes").val(scodes);$("#names").val(snames);$("#usercode").val(susercode);$("#phone").val(sphone);$("#email").val(semail);});});}function getList(str_json,page){$('\x23\x67\x72\x69\x64\x76\x69\x65\x77').html('<\x74\x61\x62\x6C\x65 \x63\x6C\x61\x73\x73="\x72\x65\x73\x75\x6C\x74\x73\x65\x74" \x69\x64="\x67\x72\x69\x64"></\x74\x61\x62\x6C\x65>');$.ajax({url: url+control+'/\x67\x65\x74\x4C\x69\x73\x74',type: '\x50\x4F\x53\x54',data: {search:str_json,page:page},success: function(data) {var obj = $.evalJSON(data);$("#paging").html(obj.paging);$('\x23\x67\x72\x69\x64').html(obj.content).fixheadertable({colratio : arr_clm,height : height,width : '\x61\x75\x74\x6F',zebra : true,sortedColId : 0,resizeCol : true,pager : false,rowsPerPage	 : 10});paging(getList,page);if(typeof(func_get)=='\x66\x75\x6E\x63\x74\x69\x6F\x6E'){func_get(data);}}});}
		</script>
        <script type="text/javascript" src="<?=url_tmpl()?>js/giaoban.js"></script>	
		<!-- ui-dialog -->
		<div id="dialog" title="Thêm mới"></div>
        <!-- ui-dialog -->
		<div class="paddingl5" style="position : relative; width:100%;">
        	<div class="boxinsert">
            	 <!--Row-->
                 <div class="rows">
                 	 <div class="fleft mleft5">
                     	  <input autocomplete="off" type="hidden" id="id" />
                          <label class="fleft w100 mtop5">Mã trung tâm:(<span class="err">*</span>)</label>
                          <input id="codes" class="insert input w220" />
                     </div>
                     <div class="fleft mleft30">
                          <label class="fleft w105 mtop5">Tên trung tâm:(<span class="err">*</span>)</label>
                          <input id="names" class="insert input w220" />
                     </div>
                     <div class="fright mright5">
                          <label>Mã tài khoản:</label>
                          <input id="usercode" class="insert input w220 codes" />
                     </div>
                 </div><!--E Row-->
                  <!--Row-->
                 <div class="rows mtop8">
                 	 <div class="fleft mleft5">
                          <label class="fleft w100 mtop5">Điện thoại:</label>
                          <input id="phone" class="insert input w220" />
                     </div>
                     <div class="fleft mleft30">
                          <label class="fleft w105 mtop5">Email:</label>
                          <input id="email" class="insert input w220" />
                     </div>
                     <div class="fright mright5">
                         
                     </div>
                 </div><!--E Row-->
                 <!--Row-->
                 <div class="rows mtop10 h28">
                 	<div id="message" class="mleft5 fleft"></div>
                  	<?php if(isset($rights['delete'])){?>
                  	<div id="delete" class="btn fright mleft5 mright5"><span class="fleft icon icon-delete"></span><span class="fleft">Xoá</span></div>
                    <?php }?>
                    <div id="refresh" class="btn fright mleft5"><span class="fleft icon icon-refresh"></span><span class="fleft">Làm mới</span></div>
                    <?php if(isset($rights['edit'])){?>
                   
                    <div id="edit" class="btn fright mleft5"><span class="fleft icon icon-edits"></span><span class="fleft">Sữa</span></div>
                      <?php }?>
					 <?php if(isset($rights['insert'])){?>
                    <div id="adds" class="btn fright mleft5"><span class="fleft icon icon-add"></span><span class="fleft">Thêm mới</span></div>
                    <?php }?>
                    <div id="search" class="btn fright mleft5 "><span class="fleft icon icon-search"></span><span class="fleft">Tìm kiến</span></div>
                 </div><!--E Row-->
                 <div class="clear"></div>
            </div>
        	<div id="gridview" class="fleft w100pt">
            	 <table class="resultset" id="grid"></table>
            </div>
            <div class="fleft" id="paging"></div>
            <div class="clear"></div>
		</div>